package article10.equals;

/**
 * 点
 *
 * @Author: cctv
 * @Date: 2019/4/2 14:12
 */
public class Point {
    public final int x;
    public final int y;

    public Point(int x, int y) {
        this.x = x;
        this.y = y;
    }

    @Override
    public boolean equals(Object o) {

        if (!(o instanceof Point)) {
            return false;
        }

        Point p = (Point) o;
        return p.x == x && p.y == y;
    }


    // remainder omitted
}
